package musics.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import musics.model.nested.File;
import musics.model.nested.Lyric;
import base2dev.core.model.imp.EntityBase;

@Entity
public class Song extends EntityBase<Song> {

	private static final long serialVersionUID = 7408837806508044013L;
	private String name;
	private String autor;
	private String gen;
	private Float duration;
	private Artist artist;
	private Album album;
	@Transient
	private int order;
	private File file;
	private long playCount;
	private long points;
	private Lyric lyric;
	@Temporal(TemporalType.TIME)
	private Date lastPlay;

	public String getName() {
		return name;
	}

	public Song setName(String name) {
		this.name = name;
		return this;
	}

	public String getAutor() {
		return autor;
	}

	public Song setAutor(String autor) {
		this.autor = autor;
		return this;
	}

	public String getGen() {
		return gen;
	}

	public Song setGen(String gen) {
		this.gen = gen;
		return this;
	}

	public Float getDuration() {
		return duration;
	}

	public Song setDuration(Float duration) {
		this.duration = duration;
		return this;
	}

	public Artist getArtist() {
		return artist;
	}

	public Song setArtist(Artist artist) {
		this.artist = artist;
		return this;
	}

	public Album getAlbum() {
		return album;
	}

	public Song setAlbum(Album album) {
		this.album = album;
		return this;
	}

	public int getOrder() {
		return order;
	}

	public Song setOrder(int order) {
		this.order = order;
		return this;
	}

	public File getFile() {
		return file;
	}

	public Song setFile(File file) {
		this.file = file;
		return this;
	}

	public long getPlayCount() {
		return playCount;
	}

	public Song setPlayCount(long playCount) {
		this.playCount = playCount;
		return this;
	}

	public long getPoints() {
		return points;
	}

	public Song setPoints(long points) {
		this.points = points;
		return this;
	}

	public Lyric getLyric() {
		return lyric;
	}

	public Song setLyric(Lyric lyric) {
		this.lyric = lyric;
		return this;
	}

	public Song setLastPlay(Date lastPlay) {
		this.lastPlay = lastPlay;
		return this;
	}

	public Date getLastPlay() {
		return lastPlay;
	}

}
